home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / clpgr2.zip / CLIPGRAF.TXT < prev    next >
Text File  |  1991-02-04  |  75KB  |  2,311 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                     CLIP-GRAPHICS
  19.  
  20.                                  The Graphics Library
  21.  
  22.                              for Clipper (tm) S87 and 5.0
  23.  
  24.                                  by Maurice J. Halmos
  25.  
  26.  
  27.  
  28.                                      Version 2.1
  29.  
  30.                                       March 1991
  31.  
  32.  
  33.  
  34.  
  35.                                    Serial #2000200
  36.  
  37.              Copyright (c) VideoSoft/Video-Comp Electr. 1988, 1989, 1991
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  74.  
  75.  
  76.  
  77.                                     1 INTRODUCTION
  78.  
  79.  
  80.      1.1 Purpose & Registration
  81.  
  82.           The CLIPGRAF library is intended to be a supplement to your Clipper
  83.      run time library.  It contains a collection of graphic mode routines for
  84.      doing all the low level and higher level graphic tasks, from determining
  85.      the graphics adaptor, to animation.  The library uses direct video rou-
  86.      tines, for fast performance, hence, it will only work with IBM (tm) compat-
  87.      ible desktop computers.  The library functions have been tested in a number
  88.      of 8088, 80286, and 80386 clones.  It support CGA, EGA, Hercules, and VGA
  89.      graphics adaptors.
  90.  
  91.           This is a shareware program.  As such, it may be freely copied and
  92.      distributed for evaluation.
  93.  
  94.           If you would like to use it, you must purchase a license.  One license
  95.      per user is required.  The license will allow you to inhibit the copyright
  96.      notice that you get when you initialize the CLIPGRAF library.
  97.  
  98.           Licenses cost $38.  Include your name and address along with the ver-
  99.      sion and serial number above.  If you desire the actual disks, include an
  100.      additional $10 for postage and handling.  If you are registering from
  101.      outside the US, you may send a check in US dollars from a bank that has a
  102.      US representation, or you may send cash through registered mail.  I am not
  103.      yet able to accept credit cards, sorry.  Make checks payable to Maurice J.
  104.      Halmos.
  105.  
  106.           Send to:
  107.  
  108.                         VideoSoft/Video-Comp Electr.
  109.                         Maurice J. Halmos
  110.                         15000 Archwood St.
  111.                         Van Nuys, CA 91405
  112.                         USA
  113.  
  114.  
  115.  
  116.      Send comments through written mail to the above address or use E-mail to my
  117.      CompuServe address:  73307,3076
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                          -1-
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  140.  
  141.  
  142.  
  143.  
  144.  
  145.      1.2 Disclaimer
  146.  
  147.  
  148.  
  149.          The author claims no responsibility for any damages caused by the use
  150.      or misuse of this library.  This product is distributed "as is" with no
  151.      warranty expressed or implied.  The author will not be responsible for any
  152.      losses incurred by the use of this product.  The author reserves the right
  153.      to make modifications at any time.  Prices are subject to change without
  154.      notice.
  155.  
  156.  
  157.          Trademarks.
  158.  
  159.      Clipper is a registered trademark of Nantucket.
  160.      CompuServe is a registered trademark of CompuServe Incorporated.
  161.      IBM is a registered trademark of International Business Machines.
  162.      Lotus is a registered trademark of Lotus Development Corporation.
  163.      Microsoft is a registered trademark of Microsoft Corporation.
  164.      Turbo C is a registered trademark of Borland International.
  165.      PCPaintbrush is a registered trademark of Zsoft.
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                          -2-
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  206.  
  207.  
  208.  
  209.  
  210.  
  211.                                 2 THE GRAPHICS LIBRARY
  212.  
  213.  
  214.      2.1 Usage
  215.  
  216.           Assuming that you have written a program, such as the sample program
  217.      included in this package, CLIPDEMO, you must compile and link as follows
  218.      (which is the usual way):
  219.  
  220.      (Compile the usual way,)
  221.  
  222.      c:\path1\clipper  c:\path2\clipdemo
  223.  
  224.  
  225.      you may use Microsoft Linker Version 5.01 or later
  226.      or QuickC Linker version 4.06 or later - This is faster than Plink86
  227.  
  228.      c:\path3\link /SE:256 clipdemo,clipdemo,, c:\path1\clipper c:\path1\clip-
  229.      graf
  230.      (the /SE switch allows to increase the number of segments used to 256)
  231.  
  232.      Turbo C Tlink - does not seem to work with vers. of CLIPGRAF later than 1.2
  233.  
  234.      Clipper's plink86 - slowest
  235.  
  236.      c:\path3\plink86 FI clipdemo,LIB c:\path1\clipper, c:\path1\clipgraf
  237.  
  238.      or Clipper's new rtlink - same spped as Microsoft link
  239.  
  240.      c:\path3\rtlink FI clipdemo,LIB c:\path1\clipper, c:\path1\clipgraf
  241.  
  242.  
  243.  
  244.  
  245.           If you use CLIPPER 5.0, make sure you use the appropriate library for
  246.      version 5.0.  There are some minor differences between the two libraries
  247.      that may make your program hang if you mix them up.  I changed the names of
  248.      the libraries from CLIPGRAF to CGRAF21.lib for clipper S87 and C5GRAF.LIB
  249.      for clipper 5.0.  Hopefully this will help you keep them separated if you
  250.      are using both version of clipper.
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                          -3-
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  272.  
  273.  
  274.  
  275.      2.2 Running the Clipdemo
  276.  
  277.           The demonstration program along with this package must be compiled and
  278.      linked as shown in the previous section.  In order to run the program you
  279.      just type its name, "clipdemo".  The program will select the highest reso-
  280.      lution graphics mode, that has more than 2 colors (i.e. for CGA it will
  281.      choose 320x200 4 colors).  You may override to different graphics mode by
  282.      calling the program with a "number" parameter (i.e. "clipdemo 6") to try to
  283.      force that mode.  If your computer supports it, then that will be the
  284.      active mode.  See table in section 2.5.2 Notes on Initializing and Modes,
  285.      for mode numbers.
  286.  
  287.      2.3 What is in the New Version
  288.  
  289.      Version 1.1 added:
  290.  
  291.               The ability to save images to a CLIPPER variable.
  292.               The ability to save images directly to disk (one pixel per byte)
  293.               Mouse interface
  294.  
  295.      Version 1.2 added:
  296.  
  297.               HERCULES  graphics support.
  298.               The function g_getdot() to read a pixel from the screen.
  299.  
  300.      Version 1.2A added:
  301.  
  302.               Tried to fix a possible problem, when a filled rectangle was drawn
  303.               out of the screen area.
  304.  
  305.      Version 1.2B added:
  306.  
  307.               Four new functions: g_xpos(), g_ypos(), g_col(), g_row().  These
  308.               are the equivalent of CLIPPERS col() and row().
  309.               Changed mailing address.
  310.  
  311.      Version 2.0 added:
  312.  
  313.               The capability of reading and writing PCX type image files.  The
  314.               PCX format is supported by a number of drawing and painting pack-
  315.               ages.
  316.               Also added a slew of functions, that allow the programer to get
  317.               more information about the video system and mode that the program
  318.               is running under.  For example:
  319.               g_adapt() to find out the type of display,
  320.               g_getcolor() to get current drawing color number,
  321.  
  322.  
  323.  
  324.                                          -4-
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  338.  
  339.  
  340.  
  341.               g_getlogy() to convert from physical coordinates to logical ones
  342.               g_monitor() to find out the type of monitor being used
  343.               g_pcx*() a number of functions to obtain information about a PCX
  344.               file
  345.               etc...
  346.  
  347.               Fixed problem with drawing filled rectangles out of the screen
  348.               area, using physical or logical coordinates.
  349.  
  350.  
  351.      Version 2.1 added:
  352.  
  353.               Split the library into two versions; one for the Summer 87 com-
  354.               piler, and one for the version 5.0 compiler.  In the version for
  355.               the 5.0 compiler, I had to dissable the "fill" options with
  356.               circles and pies.
  357.  
  358.               Fixed a problem with PCX information gathering functions,
  359.               g_pcx_xsize, g_pcx_ysize, and g_pcx_planes.  Their name has been
  360.               changed to g_pcx_xs, g_pcx_ys, and g_pcx_pl.
  361.  
  362.               Added the function g_sdump() for a screen dump to a printer (due
  363.               to popular demand).
  364.  
  365.      2.4 Summary of functions
  366.  
  367.           The following list contains all the functions that may be used with
  368.      the CLIPGRAF library.  Some of the functions return values, while others
  369.      only perform tasks.
  370.  
  371.      Function Name                  Purpose                    Returns
  372.  
  373.      g_adapt()                      Returns the type of video adapter used.
  374.  
  375.      g_arc(x1,y1,x2,y2,xb,yb,       Draws an open elliptic     Nothing
  376.            xe,ye)                   arc
  377.  
  378.      g_clear(num)                   clears section of the      Nothing
  379.                                     screen
  380.  
  381.      g_close()                      return screen to start-    Nothing
  382.                                     ing or default mode
  383.  
  384.      g_cmax()                       Return the maximum number of text columns in
  385.                                     the present video mode.
  386.  
  387.  
  388.  
  389.  
  390.                                          -5-
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  404.  
  405.  
  406.  
  407.      g_col()                        Returns the text column position.
  408.  
  409.      g_disppcx(x,y,fname            Displays a PCX file with   Number of bytes
  410.      [,n,n,n])                      the upper left corner at   read.
  411.                                     (x,y).
  412.  
  413.      g_dot(x,y)                     sets pixel at x,y coor-    Nothing
  414.                                     dinates
  415.  
  416.      g_draw(x1,y1,IMAGE,action)     Displays a rectangular     Nothing
  417.                                     screen image saved with
  418.                                     g_imget().
  419.  
  420.      g_ellip(fill,x1,y1,x2,y2)      draw ellipse optionally    Nothing
  421.                                     filled
  422.  
  423.      g_fill(x,y,bcolor)             Fill an area of the        Nothing
  424.                                     screen with the current
  425.                                     color and fillmask
  426.  
  427.      g_getbkc()                     In text mode returns the current color from
  428.                                     the palette number value.  In graphics mode
  429.                                     it returns zero.
  430.  
  431.      g_getcolor()                   Returns the current        Color number.
  432.                                     color number.
  433.  
  434.      g_getdot(x,y)                  Reads a pixel from the     Integer repre-
  435.                                     screen.                    senting the pixel
  436.                                                                color.
  437.  
  438.      g_getlstyle()                  Retrieves the 16 bit       Integer mask.
  439.                                     mask used to draw
  440.                                     straight lines.
  441.  
  442.      g_getlogx(x)                   Convert from physical x    logical x coordi-
  443.                                     coordinate value to log-   nate.
  444.                                     ical one.
  445.  
  446.      g_getlogy(y)                   Convert from physical y    logical y coordi-
  447.                                     coordinate value to log-   nate.
  448.                                     ical one.
  449.  
  450.      g_getphx(x)                    Convert from logical x     physical x coor-
  451.                                     coordinate value to        dinate.
  452.                                     physical one.
  453.  
  454.  
  455.  
  456.                                          -6-
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  470.  
  471.  
  472.  
  473.      g_getphy(y)                    Convert from logical y     physical y coor-
  474.                                     coordinate value to        dinate.
  475.                                     physical one.
  476.  
  477.      g_gettxtclr()                  Returns the value of the   Integer value of
  478.                                     current text color.        text color.
  479.  
  480.      g_imget(x1,y1,x2,y2)           Saves rectangular image    Up to 64K of
  481.                                     in a CLIPPER variable.     image data as
  482.                                     To be used with            TEXT.
  483.                                     g_draw().
  484.  
  485.      g_imload(x1,y1,"fname")        Displays a rectangular     Number of bytes
  486.                                     screen image saved with    read from disk.
  487.                                     g_imsave().
  488.  
  489.      g_imsave(x1,y1,x2,y2,"fname"   Saves rectangular image    Number of bytes
  490.      )                              to disk.                   written to disk.
  491.  
  492.      g_imsize(x1,y1,x2,y2)          Calculates the size in     Integer of image
  493.                                     bytes of a rectangular     size.
  494.                                     image.
  495.  
  496.      g_init(num)                    Initializes the graphics   False if it
  497.                                     routines                   fails, True if
  498.                                                                successful
  499.  
  500.      g_lineto(x,y)                  Draw a line in the cur-    Nothing
  501.                                     rent color and style.
  502.  
  503.      g_mode()                        Returns the mode number
  504.  
  505.      g_monitor()                    Returns the monitor type being used.
  506.  
  507.      g_mouse(num)                   Sets mouse action          Nothing
  508.  
  509.      g_moveto(x,y)                  Moves to x,y position      Nothing
  510.  
  511.      g_msread(num)                  Reads mouse status         Coordinates, but-
  512.                                                                tons pressed, and
  513.                                                                status.
  514.  
  515.      g_ncolors()                    Obtains the maxcolors      Returns max. num-
  516.                                     available in the present   ber of colors
  517.                                     mode.                      available.
  518.  
  519.  
  520.  
  521.  
  522.                                          -7-
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  536.  
  537.  
  538.  
  539.      g_pcxinfo(fname)               Read the PCX header        Number of bytes
  540.                                     about image information.   read.
  541.  
  542.      g_pcx_xs()                     Returns image width in number of pixels.
  543.  
  544.      g_pcx_ys()                     Returns image height in number of lines.
  545.  
  546.      g_pcx_ver()                    Returns PCX version.
  547.  
  548.      g_pcx_pl()                     Returns the number of memory planes that
  549.                                     make up the image.
  550.  
  551.      g_pcx_bpp()                    Returns the number of bits per pixel per
  552.                                     plane.
  553.  
  554.      g_pie(fill,x1,y1,x2,y2,        Draw a wedge cut from an   Nothing
  555.            xb,yb,xe,ye)             ellipse
  556.  
  557.      g_rect(fill,x1,y1,x2,y2)       Draw a rectangle           Nothing
  558.  
  559.      g_reg(num)                     Register to CLIPGRAF       Nothing
  560.                                     library
  561.  
  562.      g_remapal(num,color)           Remap one of the EGA or    Nothing
  563.                                     VGA colors.
  564.  
  565.      g_rmax()                       Return the maximum number of text rows in
  566.                                     the present video mode.
  567.  
  568.      g_row()                        Returns the text row position.
  569.  
  570.      g_savpcx(x1,y1,x2,y2,fname)    Saves the image bounded    Number of bytes
  571.                                     by (x1,y1) to (x2,y2) as   written.
  572.                                     a PCX file.
  573.  
  574.      g_say(row,col,text)            Puts text at row,col       Nothing
  575.  
  576.      g_setclipr(x1,y1,x2,y2)        Set clipping region for    Nothing
  577.                                     graphics.
  578.  
  579.      g_selpalt(num)                 Selects CGA color pal-     Previous palette
  580.                                     ette                       number
  581.  
  582.      g_setapage(num)                Select a video page for    Previous page
  583.                                     current output             number.
  584.  
  585.  
  586.  
  587.  
  588.                                          -8-
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  602.  
  603.  
  604.  
  605.      g_setbkc(num)                  Sets background color      Nothing
  606.  
  607.      g_setclr(num)                  Sets the foreground        Nothing
  608.                                     color.
  609.  
  610.      g_setfmsk(byte,byte,byte,      Sets the fill mask         Nothing
  611.         byte,byte,byte,byte,byte)
  612.  
  613.      g_setline(num)                 Sets line pattern.         Nothing
  614.  
  615.      g_setorg(x,y)                  Changes the coordinate     Nothing
  616.                                     origin.
  617.  
  618.      g_settxtc(num)                 Set text color.            Nothing
  619.  
  620.      g_setvpage(num)                Select a video page for    Previous page
  621.                                     viewing                    number.
  622.  
  623.      g_sdump(printer, port, res,    Will screen dump to the    Error status.
  624.           xm,ym,rv)                 printer of your choice.    0 is OK, 1 is
  625.                                                                error occurred.
  626.  
  627.      g_twindow(r1,r1,r2,c2)         Defines a scrolling text   True or False
  628.                                     display window
  629.  
  630.      g_viewport(x1,y1,x2,y2)        Sets up a rectangular      True or False
  631.                                     region for display
  632.  
  633.      g_vmemory()                    Returns the amount of video memory.
  634.  
  635.      g_wait()                       Waits for a character to   The integer cor-
  636.                                     be hit.                    responding to the
  637.                                                                character.
  638.  
  639.      g_wraptxt(flag)                Allows text to wrap in     Nothing
  640.                                     text window.
  641.  
  642.      g_xmax()                                                  Maximum x pixels
  643.  
  644.      g_xpos()                       Returns the drawing x position.
  645.  
  646.      g_ymax()                                                  Maximum y pixels
  647.  
  648.      g_ypos()                       Returns the drawing y position.
  649.  
  650.  
  651.  
  652.  
  653.  
  654.                                          -9-
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  668.  
  669.  
  670.  
  671.      2.5 Functions Description
  672.  
  673.      2.5.1 Notes on Ellipse, Arc, and Pie
  674.  
  675.           The specification of the ellipse, arc, and the pie involves the con-
  676.      cept of the "bounding rectangle," which is the smallest rectangle that
  677.      completely encloses the figure being drawn.  Since the arc and pie are both
  678.      parts of the ellipse, in all cases you have to specify the bounding rectan-
  679.      gle of an ellipse.  Both the bounding rectangle and the basic rectangle are
  680.      specified by the logical coordinates of their upper left hand and lower
  681.      right corners.
  682.  
  683.           For the arc as well as the pie, the elliptic segment is drawn as
  684.      follows.  A (imaginary) line is drawn from the center of the ellipse (of
  685.      which the arc or the pie is a part) to a point specified as the beginning
  686.      point.  The g_pie() and the g_arc() functions begin drawing the curved edge
  687.      at the point where that line intersects the ellipse.  The functions trace
  688.      over the underlying ellipse, using the current color, in a counter-
  689.      clockwise direction until reaching the point where an imaginary line drawn
  690.      from the center to a specified end point cuts the ellipse.  Curved lines
  691.      are always drawn in a solid line style.  Thus the ellipse and the pie can
  692.      only have a solid boundary.  They can however be filled in the interior
  693.      with a user defined pattern.
  694.  
  695.      2.5.2 Notes on Initializing and Modes
  696.  
  697.           You need to initialize the graphics driver to operate the graphics
  698.      functions.  The g_init() function does this, and sets up the screen to the
  699.      highest mode supported by the hardware.  You may override the mode selec-
  700.      tion by including an argument to the function, i.e. g_init(mode_number).
  701.  
  702.           To use the HERCULES Graphics mode, you must run the utility HERC.COM
  703.      before your program in order to set the video vectors.  This utility is
  704.      placed in the public domain by Microsoft and is included in this package.
  705.  
  706.           The following modes are supported:
  707.  
  708.           Mode #        Mode Name
  709.  
  710.           19            VGA 320x200  256 colors
  711.           18            VGA 640x480  16 colors
  712.           17            VGA 649x480  BW 2 colors
  713.           16            EGA 640x350  4 or 16 colors
  714.           15            EGA 640x350  BW 2 colors
  715.           14            EGA 640x200  16 colors
  716.           13            EGA 320x200  16 colors
  717.  
  718.  
  719.  
  720.                                          -10-
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  734.  
  735.  
  736.  
  737.           8             Hercules BW 2 colors (Must run HERC.COM before)
  738.           7             MDA Text 80x25 BW
  739.           6             CGA 640x200  BW 2 colors
  740.           5             CGA 320x200  BW 4 grey
  741.           4             CGA 320x200  4 colors
  742.           3             CGA Text 80x25 16 or 8 colors
  743.           -1            Default mode for the current hardware configuration.  Is
  744.                         used to return to the initial mode, or just to ini-
  745.                         tialize the graphics routine without changing modes in
  746.                         order to read some of the hardware information.
  747.  
  748.           The first time you use g_init(), you will get a copyright message,
  749.      further calls to g_init() (if you want to change the mode for instance)
  750.      will not re-display this screen.  To inhibit the original copyright screen
  751.      you must use the function g_reg(reg_number), where reg_number is the
  752.      registration number you get when you become a registered user.
  753.  
  754.      2.5.3 Notes on Color
  755.  
  756.           The color number may vary according to the hardware used.  The default
  757.      colors in CGA text mode, EGA text and graphics, or the first 16 VGA text
  758.      and graphics are list below.
  759.  
  760.           In some of the functions, such as remapping the palette, you must
  761.      select a color value, which is a 3 byte number [blue, green, red], instead
  762.      of a color number.  With a VGA adaptor, you can select each color intensity
  763.      to be any value between 0 to 63.  If you choose a larger value, the func-
  764.      tion will fail.  From the table below, you can see that bright white is all
  765.      colors at maximum intensity.  The color value of bright white is then
  766.      63+63*256+63*(256^2) which is R+G+B.
  767.  
  768.      Color Palette Number          Color              Hexadecimal Color value
  769.  
  770.              0                     Black              0x000000
  771.              1                     Blue               0x2a0000
  772.              2                     Green              0x002a00
  773.              3                     Cyan               0x2a2a00
  774.              4                     Red                0x00002a
  775.              5                     Magenta            0x2a002a
  776.              6                     Brown              0x00152a
  777.              7                     White              0x2a2a2a
  778.              8                     Dark grey          0x151515
  779.              9                     Light blue         0x3f1515
  780.              10                    Light green        0x153f15
  781.              11                    Light cyan         0x3f3f15
  782.              12                    Light red          0x15153f
  783.  
  784.  
  785.  
  786.                                          -11-
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  800.  
  801.  
  802.  
  803.              13                    Light magenta      0x3f153f
  804.              14                    Yellow             0x153f3f
  805.              15                    Bright white       0x3f3f3f
  806.  
  807.      2.5.4 Notes in Fill Pattern
  808.  
  809.           The fill pattern is specified by the argument in g_setfmsk(), which is
  810.      made up of eight integers corresponding to eight bytes.  Since each charac-
  811.      ter has 8 bits, you can think of this array of bits as a model of an area
  812.      on the screen, 8 pixels wide and 8 pixels tall, with the first byte
  813.      representing the first row of the area.  When filling an 8x8 area using the
  814.      mask, those pixels that correspond to 0 bits are left untouched while the
  815.      rest are filled with the current color.  For areas larger than 8x8 pixels,
  816.      the fill operation uses the mask on successive 8x8 blocks until the entire
  817.      area is covered.  Thus a solid fill is specified when all eight bytes
  818.      contain the value FFh (255 decimal).  This is the default value of the fill
  819.      style in the graphics package.  See demo program for further examples.
  820.  
  821.      2.5.5 Notes on Raster Image Save and Load
  822.  
  823.           There are three basic ways of saving and loading images.
  824.  
  825.               1. To and from a CLIPPER memory variable using the g_imget() and
  826.                  g_draw() function pairs, and g_imsize() to check for size, and
  827.  
  828.               2. To and from a disk file using g_imsave() and g_imload().
  829.  
  830.               3. To and from disk using the PCX utilities.  The image saved is
  831.                  of the same format as with the first method, except that it is
  832.                  compressed using an RLE technique.  Real scanned photographs
  833.                  don't compress very much, but uniform color pictures (such as
  834.                  the ones created on a computer) may compress as much as 80%.
  835.  
  836.           Using the first method you must check to make sure you have enough RAM
  837.      memory, and for the second method, enough disk space.  Using the first
  838.      method has the advantage of being able to "pop" the image on the screen
  839.      rather quickly.  You can also save the CLIPPER variable to disk.  The
  840.      drawback, is that you can only do this in 64K chunks.  The disk method
  841.      allows you to save a full high resolution screen to disk in one command,
  842.      but is slower.
  843.  
  844.           The coding of the image is different for the two methods, and cannot
  845.      be interchanged.  The disk method uses one byte per pixel; for a high res
  846.      VGA mode, this equals 640x480 = 307K bytes!  Using this scheme, allows
  847.      images saved in one mode to be showed in a different one (i.e. CGA to EGA
  848.      or vice versa).
  849.  
  850.  
  851.  
  852.                                          -12-
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  866.  
  867.  
  868.  
  869.           Using the RAM memory method the minimum amount of bytes is used.  For
  870.      instance, one pixel in high res VGA or EGA (16 colors) requires only half a
  871.      byte.  Images may be switched from one mode to another, only if the pixels
  872.      use the same number of bits.  Otherwise, on gets garbage on the screen.
  873.  
  874.           The following table shows some of the full screen sizes in bytes:
  875.  
  876.                   Mode        Res.            Colors        Size
  877.  
  878.                   4 & 5       320x200         4             16,285
  879.                   6           640x200         2             16,285
  880.                   13          320x200         16            32,968
  881.                   14          640x200         16            65,128
  882.                   15          640x350         2             56,866
  883.                   16          640x350         16            113,728
  884.                   17          640x480         2             38,965
  885.                   18          640x480         16            155,848
  886.                   19          320x200         256           64,525
  887.  
  888.           This table should give you an idea of the size of screen that can be
  889.      saved to memory.
  890.  
  891.  
  892.           Pixel action: OR, AND, RESET, SET XOR:
  893.  
  894.           When you use g_draw(), you can specify the pixel action.  To put a
  895.      pixel on the screen regardless of what is currently there, you should use
  896.      SET.  To make an image disappear you should XOR it with itself.
  897.  
  898.      2.5.6 Notes on PCX Images Save and Load
  899.  
  900.           PCX Image file format was first developed by Zsoft, in the drawing
  901.      package PC Paintbrush.  This format has become popular, and is now sup-
  902.      ported by a number of commercial drawing packages and also image capture
  903.      software.  The CLIPGRAF PCX functions open the doors to CLIPPER all the
  904.      drawing and scanning software packages available.  You will be able to read
  905.      information about a PCX image file, display an image, and save an image.
  906.      One possibility is to use a drawing or image scanning program to create an
  907.      opening logo, save it with a PCX format, and then use it as the opening
  908.      screen of your CLIPPER program.  Another possibility is to include the
  909.      images as part of a data base.  Keep the image name in the regular field,
  910.      and load it automatically when displaying the record.
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.                                          -13-
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  932.  
  933.  
  934.  
  935.           The image file is made up of three main parts:  (1) The header made up
  936.      of 128 bytes, (2) the image, and (3) an optional 256x3 byte array of the
  937.      image color map.  The image is compressed using an RLE method, where con-
  938.      secutive repeating bytes are compressed as two, the repetition number and
  939.      the data byte.  Once decompressed, the image is in the native format of the
  940.      particular video mode.  For instance, lowres CGA is 1 plane, 2 consecutive
  941.      bits per pixel, EGA and VGA are one consecutive bit per pixel, but 1 or 2
  942.      or 4 color planes, MCGA is one color plane, but 8 consecutive bits per
  943.      pixel (256 colors).  From the file header one may determined if a color
  944.      palette map exists, and you may decide whether you want to remap the pal-
  945.      ette or not.  The remapping is most meaningful when working with a VGA or
  946.      better type system, with EGA all you can do is rotate the existing 16
  947.      colors.  When reading an unknown PCX file you have to determine which mode
  948.      will display the image correctly, and also if that video mode is available
  949.      in the current hardware.
  950.  
  951.           To determine the image natural video mode, you can read the image
  952.      header to obtain the bits_per_pixel per plane using the function
  953.      g_pcx_bpp(), and the number of planes using g_pcx_pl().  Then match the
  954.      information to the following table:
  955.  
  956.                    Mode           Bits/pixel/plane        # of planes
  957.  
  958.                 CGA (4,5)                2                     1
  959.                  CGA (6)                 1                     1
  960.                  Hercules                1                     1
  961.              EGA/VGA (15-18)             1                  1 to 4
  962.                 MCGA (19)                8                     1
  963.  
  964.  
  965.      For more detailed information, refer to any documentation on the graphics
  966.      display for the IBM.
  967.  
  968.           If you are running with a VGA display, where most video modes are
  969.      available, you have the option of letting the function g_disppcx() to auto-
  970.      matically choose and switch to the video mode that it deems most adequate,
  971.      without checking if that mode is available.  This is done by including the
  972.      flag argument as 1 (see function description).  The default is not to
  973.      switch automatically because in most uses, you would work with PCX files
  974.      that you already know about, and you already have a combination of other
  975.      graphics elements (all of which would get cleared and reset when you switch
  976.      graphics modes).
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.                                          -14-
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  998.  
  999.  
  1000.  
  1001.           As with the g_draw() function, when you display a PCX image, you have
  1002.      the option to SET, AND, OR, XOR the pixels. SET will draw the image inde-
  1003.      pendent of background, and the other modes will perform and operation with
  1004.      the existing bits.  For instance, if you want to erase an image, but not
  1005.      the changes done to it, repaint the original on top pf the modified one
  1006.      using the XOR option.  If you don't include the ACTION parameter, the
  1007.      default is to use SET, which draws the image on top of any background
  1008.      pixels.
  1009.  
  1010.           When calling the PCX display function, you also have the option of
  1011.      letting the function to remap the whole palette (256 colors in MCGA),
  1012.      before displaying the image.  This is also done by including a flag argu-
  1013.      ment (1 for remap, anything else no_remap).  The default is no_remap
  1014.      because remapping will affect all your color scheme, and may change your
  1015.      colors to something not desirable (i.e. black on black).
  1016.  
  1017.           Finally, if you try to display a picture past the end of the screen
  1018.      (in the horizontal direction), the display function will crop the image in
  1019.      a very crude way.  Without getting into details, this cropping does not
  1020.      work well with multiplane images but does make some interest effects.
  1021.  
  1022.           I strongly recommend that you experiment with different PCX images and
  1023.      the different options.  I tried to include most of the useful functionality
  1024.      that a CLIPPER programmer might desire, and then some more.
  1025.  
  1026.      2.5.7 Notes on Using the Mouse.
  1027.  
  1028.           The mouse interface is handled by a two function combination, g_mou-
  1029.      se() and g_msread().  The first function, g_mouse() causes an action, and
  1030.      the second function is used to read the status.  This is done by reading
  1031.      the 4 registers (AX BX CX DX) using the appropriate argument 1 to 4.  The
  1032.      following table shows the actions and results:
  1033.  
  1034.       g_mouse()  g_msread() Return Value of           Purpose
  1035.          num       num      g_msread(num)
  1036.            0          1     1 Mouse installed        Reset mouse and return
  1037.                             0 Mouse not installed    status and number of but-
  1038.                                                      tons
  1039.                       2     Number of buttons
  1040.            1                                         Make mouse cursor visible
  1041.            2                                         Hide mouse cursor
  1042.            3          2     0 no button pressed      Return button status and
  1043.                             1 left button pressed    mouse position.
  1044.                             2 right button pressed
  1045.                             3 both buttons pressed
  1046.                       3     y coordinate
  1047.  
  1048.  
  1049.  
  1050.                                          -15-
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1064.  
  1065.  
  1066.  
  1067.                       4     x coordinate
  1068.  
  1069.      The coordinates are in units of "mickeys".  These are 0-639 across, and
  1070.      0-ymax in the vertical, where ymax is the maximum number of pixels in the
  1071.      vertical.
  1072.  
  1073.           The mouse routines use the standard bios interrupt calls related to
  1074.      the mouse driver.  I have found that the effects are not always as
  1075.      expected, and they may vary from one screen mode to another.  You can test
  1076.      this with the clipdemo program accompanying this package.
  1077.  
  1078.      2.5.8 Functions
  1079.  
  1080.           FUNCTION:  g_adapt()
  1081.  
  1082.           Purpose: Returns the video adapter in use.
  1083.  
  1084.           Returns:  the following numbers; 1-MDPA, 2-CGA, 4-EGA, 8-VGA,
  1085.                   10-MCGA, 20-Hercules.
  1086.  
  1087.           FUNCTION:  g_arc(x1,y1,x2,y2,xb,yb,xe,ye)
  1088.  
  1089.           Purpose: Use g_arc to draw a segment of an ellipse using the
  1090.           current color.
  1091.  
  1092.           Arguments:
  1093.  
  1094.               x1,y1  Coordinates of upper left corner of bounding rectangle of
  1095.                     the ellipse to which the arc belongs.
  1096.  
  1097.               x2,y2  Coordinates of lower right corner of bounding rectangle of
  1098.                     the ellipse to which the arc belongs.
  1099.  
  1100.               xb,yb  Arc begins at the point where a line drawn from the center
  1101.                     of the bounding rectangle to (xb,yb) cuts the ellipse.
  1102.  
  1103.               xe,ye  Arc ends at the point where a line drawn from the center of
  1104.                     the bounding rectangle to (xe,ye) cuts the ellipse.
  1105.  
  1106.           FUNCTION:  g_clear(num)
  1107.  
  1108.           Purpose:  Clear an area of the screen and fill it with the current
  1109.                    background color.
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.                                          -16-
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1130.  
  1131.  
  1132.  
  1133.           Arguments: 0  Entire screen is cleared
  1134.                     1 Only current viewport is cleared
  1135.                     2 Only current text window is cleared
  1136.  
  1137.  
  1138.  
  1139.           FUNCTION:  g_close()
  1140.  
  1141.           Purpose: Resets the screen to the mode it was before g_init() was
  1142.           invoked.
  1143.  
  1144.           FUNCTION:  g_cmax()
  1145.  
  1146.           Purpose:  To obtain the maximum number of columns in the current
  1147.                    video mode.
  1148.  
  1149.           Returns:  Integer corresponding to the number of columns.
  1150.  
  1151.           FUNCTION:  g_col()
  1152.  
  1153.           Returns:  Integer corresponding to the text column position.
  1154.  
  1155.           FUNCTION:  g_disppcx(x,y,fname [,action,fm,fp])
  1156.  
  1157.           Purpose:  Display a PCX image file, with name "fname" with the upper
  1158.                    left corner at the (x,y) real coordinates.  Optional parame-
  1159.                    ters are -fp- as 1 to remap the palette according to the
  1160.                    image information, -fm- as 1 to determine and switch to the
  1161.                    appropriate image mode, and -action- to determine the pixel
  1162.                    operation to the background pixels.
  1163.  
  1164.           Arguments:
  1165.  
  1166.               x,y   Coordinates of upper left corner of bounding rectangle of
  1167.                     the image.
  1168.  
  1169.               fnamePCX file name such as "myfile.pcx"
  1170.  
  1171.           Optional Arguments:
  1172.  
  1173.               action  Select pixel action, set, reset, and, or, xor.  Default is
  1174.                     set.  The number values are 0 - for OR, 1 - for AND, 2 - for
  1175.                     RESET, 3 - for SET, and 4 - for XOR.  Reset will invert the
  1176.                     pixel color.  For instance, if you display a black and white
  1177.                     picture, by using the RESET action you can display it as a
  1178.                     negative.
  1179.  
  1180.  
  1181.  
  1182.                                          -17-
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1196.  
  1197.  
  1198.  
  1199.               fm    if 1 then function will automatically switch video mode
  1200.                     before displaying the image.  Default is 0.
  1201.  
  1202.               fp    if 1 then the palette will be remapped. Default is 0.
  1203.  
  1204.           Returns:  The number of bytes read.  You may use this to catch errors.
  1205.  
  1206.           FUNCTION:  g_dot(x,y)
  1207.  
  1208.           Purpose: Set a specific pixel to the current color
  1209.  
  1210.           Arguments: x,y  is the current coordinate system
  1211.  
  1212.           FUNCTION:  g_draw(x1,y1,IMAGE,action)
  1213.  
  1214.           Purpose:     The function is used to draw a rectangular image, that
  1215.                       was saved to a CLIPPER variable by g_imget().
  1216.  
  1217.           Arguments:   The rectangle coordinates, top left corner is (x1,y1),
  1218.                       IMAGE is the CLIPPER text variable created with g_imget(),
  1219.                       and action is a number that specifies the pixel action to
  1220.                       be used.  These may be, 0 - for OR, 1 - for AND, 2 - for
  1221.                       RESET, 3 - for SET, and 4 - for XOR.
  1222.  
  1223.           FUNCTION:  g_ellip(fill,x1,y1,x2,y2)
  1224.  
  1225.           Purpose: Draw a filled or bordered ellipse that you specify by the
  1226.                   corners of the bounding rectangle.  With CLIPPER 5.0, only the
  1227.                   bordered figure will be drawn.
  1228.  
  1229.           Arguments:
  1230.  
  1231.               fill   0 do not fill, i.e. bordered only
  1232.                     1 fill with the current fillmask.
  1233.                     With CLIPPER 5.0, this flag will be ignored.
  1234.  
  1235.               x1,y1  Coordinates of upper left corner of bounding rectangle of
  1236.                     the ellipse to which the arc belongs.
  1237.  
  1238.               x2,y2  Coordinates of lower right corner of bounding rectangle of
  1239.                     the ellipse to which the arc belongs.
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.                                          -18-
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1262.  
  1263.  
  1264.  
  1265.           FUNCTION:  g_fill(x,y,bcolor)
  1266.  
  1267.           Purpose: Fill an area of the screen with the current color using the
  1268.                   current fillmask.  Function is ignored with the CLIPPER 5.0
  1269.                   compiler.
  1270.  
  1271.           arguments: x,y     position of starting point
  1272.                     bcolor  Color number of the boundary at which filling should
  1273.                     stop
  1274.  
  1275.           FUNCTION:  g_getbkc(num)
  1276.  
  1277.           Purpose: Returns the current text mode background color value.
  1278.  
  1279.           Returns: New palette number for the background color when in text
  1280.               mode.  Otherwise it returns zero.
  1281.  
  1282.           FUNCTION:  g_getcolor()
  1283.  
  1284.           Returns: The current drawing color palette number.
  1285.  
  1286.           FUNCTION:  g_getdot(x,y)
  1287.  
  1288.           Returns: Returns the pixel at coordinate (x,y) color palette number.
  1289.           If the coordinate is outside the drawing area, then returns a -1.
  1290.  
  1291.           FUNCTION:  g_getlstyle()
  1292.  
  1293.           Returns:  Integer representing the 16 bit pattern of the current line
  1294.                style.
  1295.  
  1296.           FUNCTION:  g_getlogx(x)
  1297.  
  1298.           Purpose:  To obtain the logical or relative x coordinate value given
  1299.                physical x value.
  1300.  
  1301.           FUNCTION:  g_getlogy(y)
  1302.  
  1303.           Purpose:  To obtain the logical or relative y coordinate value given
  1304.                physical y value.
  1305.  
  1306.           FUNCTION:  g_getphx(x)
  1307.  
  1308.           Purpose:  To obtain the physical x coordinate given the logical or
  1309.                relative x coordinate.
  1310.  
  1311.  
  1312.  
  1313.  
  1314.                                          -19-
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1328.  
  1329.  
  1330.  
  1331.           FUNCTION:  g_getphy(y)
  1332.  
  1333.           Purpose:  To obtain the physical y coordinate given the logical or
  1334.                relative y coordinate.
  1335.  
  1336.           FUNCTION:  g_gettxtclr()
  1337.  
  1338.           Returns:  The integer value of the current text color palette number
  1339.  
  1340.           FUNCTION:  g_imget(x1,y1,x2,y2)
  1341.  
  1342.           Purpose:     The function is used to save a rectangular screen image
  1343.                       into a CLIPPER text variable.  The CLIPPER variable may
  1344.                       then be treated as any other.
  1345.  
  1346.           Arguments:   The rectangle coordinates, top left corner is (x1,y1) and
  1347.                       lower right corner (x2,y2).
  1348.  
  1349.           Returns:     Character string up to 64K long.  Size may be checked
  1350.                       before operation, using g_imsize().  See "Notes on Raster
  1351.                       Image Save and Load" section.
  1352.  
  1353.           FUNCTION:  g_imload(x1,y1,"fname")
  1354.  
  1355.           Purpose:     The function is used to load a rectangular screen image
  1356.                       from disk.  This image file must have been created with
  1357.                       g_imsave().
  1358.  
  1359.           Arguments:   The rectangle coordinates top left corner is (x1,y1).
  1360.                       "fname" is the file name to be used.
  1361.  
  1362.           Returns:     Integer of the number of bytes loaded.  If there was a
  1363.                       problem opening file (i.e. not found), then it returns a
  1364.                       -1.  See "2.5.5" section.
  1365.  
  1366.           FUNCTION:  g_imsave(x1,y1,x2,y2,"fname")
  1367.  
  1368.           Purpose:     The function is used to save a rectangular screen image
  1369.                       to disk.  This image may be reloaded with g_imload().
  1370.  
  1371.           Arguments:   The rectangle coordinates, top left corner is (x1,y1) and
  1372.                       lower right corner (x2,y2).  "fname" is the file name to
  1373.                       be used.   If the file-name already exist, it is written
  1374.                       over.
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                                          -20-
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1394.  
  1395.  
  1396.  
  1397.           Returns:     Integer of the number of bytes written.  See "2.5.5"
  1398.                       section.
  1399.  
  1400.           FUNCTION:  g_imsize(x1,y1,x2,y2)
  1401.  
  1402.           Purpose:     The function is used to obtain the size of rectangular
  1403.                       screen image.  This is used to determine if there is
  1404.                       enough RAM memory to hold the image.
  1405.  
  1406.           Arguments:   The rectangle coordinates, top left corner is (x1,y1) and
  1407.                       lower right corner (x2,y2).
  1408.  
  1409.           Returns:     Integer value of the number of bytes, that would be
  1410.                       require to hold the image.  See "2.5.5" section.
  1411.  
  1412.           FUNCTION:  g_init(num)
  1413.  
  1414.           Purpose: The g_init() function has two purposes:  It sets which video
  1415.                   mode to use for the graphics and gets the data for that mode
  1416.                   and stores it to a data structure for program access. (i.e.
  1417.                   g_mode(), g_xmax(), g_ymax(), g_ncolors())
  1418.  
  1419.           Arguments: mode  Optional mode number.  If no argument is used, the
  1420.                          highest possible one is selected.  If mode number used
  1421.                          is not supported by the hardware, then again the high-
  1422.                          est possible one is selected.
  1423.  
  1424.           Returns: Logical TRUE if successful, FALSE is no mode was found.
  1425.  
  1426.           FUNCTION:  g_lineto(x,y)
  1427.  
  1428.           Purpose: Draw a line from the current position to a new point using
  1429.                   the current color and line style
  1430.  
  1431.           Arguments:  x,y Coordinate point to which line is drawn
  1432.  
  1433.           FUNCTION:  g_mode()
  1434.  
  1435.           Purpose: Retrieves the current video mode
  1436.  
  1437.           Returns: The mode number (see "Notes on Initializing and Modes"
  1438.           section)
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.                                          -21-
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1460.  
  1461.  
  1462.  
  1463.           FUNCTION:  g_monitor()
  1464.  
  1465.           Returns:  Integer representing the monitor.  The are; 1 for MONO, 2
  1466.                for COLOR or enhanced in CGA mode, 4 for Enhanced color monitor,
  1467.                and 18 for analog monitor.
  1468.  
  1469.           FUNCTION:  g_mouse(num)
  1470.  
  1471.           Purpose: Reset and activate mouse functions
  1472.  
  1473.           Parameters: Number specifying the mouse actions (see "Notes on Using
  1474.           the Mouse." section)
  1475.  
  1476.           Returns:  Nothing
  1477.  
  1478.           FUNCTION:  g_moveto(x,y)
  1479.  
  1480.           Purpose: Change the current position to a new point.
  1481.  
  1482.           Arguments:  x,y Coordinate of new position.
  1483.  
  1484.           FUNCTION:  g_msread(num)
  1485.  
  1486.           Purpose: Read the results of g_mouse().  This includes mouse status,
  1487.               position, and buttons pressed
  1488.  
  1489.           Parameters: Number specifying the mouse parameter to be read (see
  1490.           "2.5.7" section)
  1491.  
  1492.           Returns:  Number corresponding to status, number of buttons, position.
  1493.  
  1494.           FUNCTION:  g_ncolors()
  1495.  
  1496.           Purpose: Retrieves the maximum number of colors supported by the
  1497.                   current video mode
  1498.  
  1499.           Returns: The color number (see "Notes on Color" section)
  1500.  
  1501.           FUNCTION:  g_pcxinfo(fname)
  1502.  
  1503.           Purpose:  To read the PCX file header and obtain the information that
  1504.                can be retrieve with the g_pcx_XXX() functions.  Must use before
  1505.                the information retrieval functions.
  1506.  
  1507.           Argument: File name string.
  1508.  
  1509.  
  1510.  
  1511.  
  1512.                                          -22-
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1526.  
  1527.  
  1528.  
  1529.           Returns: 0 if called in with error, -1 if unable to open file, or the
  1530.                number of bytes read (128).
  1531.  
  1532.           FUNCTION:  g_pcx_xs()
  1533.  
  1534.           Returns:  The pixel width of the file read by g_pcxinfo(), or of the
  1535.                image just displayed, or the image just saved.
  1536.  
  1537.           FUNCTION:  g_pcx_ys()
  1538.  
  1539.           Returns:  The pixel height of the file read by g_pcxinfo(), or of the
  1540.                image just displayed, or the image just saved.
  1541.  
  1542.           FUNCTION:  g_pcx_ver()
  1543.  
  1544.           Returns:  The PCX version number of the file read by g_pcxinfo(), or
  1545.                of the image just displayed, or the image just saved.  The num-
  1546.                bers are as follows:
  1547.                2 -  old PCX no palette
  1548.                3 -  no palette info
  1549.                4 - old Microsoft windows - no palette (new windows uses 3 or 5)
  1550.                5 - with palette
  1551.  
  1552.           FUNCTION:  g_pcx_pl()
  1553.  
  1554.           Returns:  The number of image planes of the file read by g_pcxinfo(),
  1555.                or of the image just displayed, or the image just saved.  See
  1556.                notes for explanation of planes.
  1557.  
  1558.           FUNCTION:  g_pcx_bpp()
  1559.  
  1560.           Returns:  The bits_per_pixel_per_plane of the file read by g_pcxin-
  1561.                fo(), or of the image just displayed, or the image just saved.
  1562.                See motes for more information.
  1563.  
  1564.           FUNCTION:  g_pie(fill,x1,y1,x2,y2,xb,yb,xe,ye)
  1565.  
  1566.           Purpose: Draws a filled or bordered wedge whose boundary consists
  1567.           of a segment of an ellipse and lines joining the center of the
  1568.           ellipse to the beginning and end points of the segment.  With
  1569.           CLIPPER 5.0, only the bordered figure will be drawn.
  1570.  
  1571.           Arguments:
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.                                          -23-
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1592.  
  1593.  
  1594.  
  1595.               fill   Number that indicates whether to fill (fill=1), or just
  1596.                     draw a border (fill=0).  With Clipper 5.0 this argument is
  1597.                     ignored (but needed for compatibility with S87) and is taken
  1598.                     as 0.
  1599.  
  1600.               x1,y1  Coordinates of upper left corner of bounding rectangle of
  1601.                     the ellipse to which the pie belongs.
  1602.  
  1603.               x2,y2  Coordinates of lower right corner of bounding rectangle of
  1604.                     the ellipse to which the pie belongs.
  1605.  
  1606.               xb,yb  Pie begins at the point where a line drawn from the center
  1607.                     of the bounding rectangle to (xb,yb) cuts the ellipse.
  1608.  
  1609.               xe,ye  Pie ends at the point where a line drawn from the center of
  1610.                     the bounding rectangle to (xe,ye) cuts the ellipse.
  1611.  
  1612.           FUNCTION:  g_rect(fill,x1,y1,x2,y2)
  1613.  
  1614.           Purpose: Draw a filled or bordered rectangle that you specify by
  1615.                   the corners.
  1616.  
  1617.           Arguments:
  1618.  
  1619.               fill   0 do not fill, i.e. bordered only
  1620.                     1 fill with the current fillmask.
  1621.  
  1622.               x1,y1  Coordinates of upper left corner.
  1623.  
  1624.               x2,y2  Coordinates of lower right corner.
  1625.  
  1626.  
  1627.  
  1628.           FUNCTION:  g_reg(num)
  1629.  
  1630.           Purpose:  To inhibit the copyright screen that is shown the first time
  1631.                    that g_init() is used.
  1632.  
  1633.           Arguments: Registration number that is supplied when you register.
  1634.  
  1635.           FUNCTION:  g_remapal(num,color)
  1636.  
  1637.           Purpose:   Use in EGA or VGA environment to redefine how a specific
  1638.                value contained in a pixel is associated with a color displayed
  1639.                on the screen.  Thus this function redefines a single color value
  1640.                in EGA or VGA palette. For example, since a color pixel value of
  1641.  
  1642.  
  1643.  
  1644.                                          -24-
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1658.  
  1659.  
  1660.  
  1661.                0 always signifies background, you can change the background
  1662.                color by redefining the color number 0.  See notes on color
  1663.                values.
  1664.  
  1665.           Arguments:
  1666.  
  1667.                    num, is the palette number or color number to change
  1668.  
  1669.                    color, is the new color value.  See notes for explanation
  1670.                         about color values.
  1671.  
  1672.           Returns nothing.
  1673.  
  1674.           FUNCTION:  g_rmax()
  1675.  
  1676.           Purpose:  To obtain the maximum number of rows in the current
  1677.                    video mode.
  1678.  
  1679.           Returns:  Integer corresponding to the number of rows.
  1680.  
  1681.           FUNCTION:  g_row()
  1682.  
  1683.           Returns:  Integer corresponding to the text row position.
  1684.  
  1685.           FUNCTION:  g_savpcx(x1,y1,x2,y2,"fname")
  1686.  
  1687.           Purpose:     The function is used to save a rectangular screen image
  1688.                       to disk using the PCX compression.
  1689.  
  1690.           Arguments:   The rectangle coordinates, top left corner is (x1,y1) and
  1691.                       lower right corner (x2,y2).  "fname" is the file name to
  1692.                       be used.   If the file-name already exist, it is written
  1693.                       over.
  1694.  
  1695.           Returns:     Integer of the number of bytes written, or 0 if wrong
  1696.                       arguments are used, or -1 if an error occurred opening the
  1697.                       file.
  1698.  
  1699.           FUNCTION:  g_say(row,col,text)
  1700.  
  1701.           Purpose: Puts text in the screen using the current text color.
  1702.               Similar to the "@row,col say 'TEXT'" command.
  1703.  
  1704.           Arguments:  row,col is the text coordinates (i.e. 80x25)
  1705.                      text  is a string to be output.
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                                          -25-
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1724.  
  1725.  
  1726.  
  1727.           FUNCTION:  g_sdump(printer, port, res,xm,ym,rv)
  1728.  
  1729.           Purpose: Starts a printer dump of the active CRT image.  The screen
  1730.                    dum routine can magnify but not improve the resolution of the
  1731.                    CRT image.
  1732.  
  1733.           Arguments:
  1734.  
  1735.                Printer: enter a number in the range 0 to 5 where:
  1736.  
  1737.                       0 = Epson MX driver (use for all Epson MX emultors includ-
  1738.                       ing Okidata, IBM Proprinter, IBM Graphics printer, Star,
  1739.                       Gemini, etc.)
  1740.  
  1741.                       1 = Epson LQ driver (use with Epson 24 pin printers and
  1742.                       emulators of the graphics protocol, including Star Gemini
  1743.                       24 pin printers and Panasonic 24 pin printers.)
  1744.  
  1745.                       2 = Toshiba P driver for Toshiba 24 pin printers.
  1746.  
  1747.                       3 = HP Laser Jet driver.  Includes all Laser Jets and the
  1748.                       HP Desk Jet.
  1749.  
  1750.                       4 = HP Think Jet driver.
  1751.  
  1752.                       5 = Epson FX driver.
  1753.  
  1754.                Port: 0 = LPT1, 1 = LPT2
  1755.  
  1756.                res:   each of the printer drivers supports different resolution
  1757.                       print modes.  Specify which print mode you wish to use
  1758.                       according to the following table:
  1759.  
  1760.                    EPSON MX, FX driver
  1761.                           0 = single density normal speed
  1762.                           1 = double density half speed
  1763.                           2 = double density normal speed
  1764.                           3 = quadruple density
  1765.                           4 to 7 = same as 0 to 3 but landscape mode.
  1766.  
  1767.                    EPSON LQ driver
  1768.                           0 = single density normal speed 8 pin mode
  1769.                           1 = double density half speed 8 pin mode
  1770.                           2 = double density normal speed 8 pin mode
  1771.                           3 = quadruple density 8 pin mode
  1772.                           4 = standard density 24 pin mode
  1773.  
  1774.  
  1775.  
  1776.                                          -26-
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1790.  
  1791.  
  1792.  
  1793.                           5 = double density 24 pin mode
  1794.                           6 = CRT III 24 pin mode
  1795.                           7 = triple density 24 pin mode
  1796.                           8 = hex density 24 pin mode
  1797.  
  1798.                    Toshiba P driver
  1799.                           0 = 180x180 dot image transfer
  1800.                           1 = 180x360 dot image transfer
  1801.  
  1802.                    HP Laser Jet driver
  1803.                           0 = 75 dots/inch
  1804.                           1 = 100 dots/inch
  1805.                           2 = 150 dots/inch
  1806.                           3 = 300 dots/inch
  1807.  
  1808.                    HP Think Jet Driver
  1809.                           0 = 640 dots
  1810.                           1 = 1280 dots
  1811.  
  1812.                xm:    Integer which holds the x multiplier for the dot width,
  1813.                       must be >= 1.  The CRT image is magnified in the horizon-
  1814.                       tal dimension by the xm multiplier when output to the
  1815.                       printer.
  1816.  
  1817.                ym:    Integer which holds the y multiplier for the dot width,
  1818.                       must be >= 1.  The CRT image is magnified in the vertical
  1819.                       dimension by the ym multiplier when output to the printer.
  1820.  
  1821.                rv:    Reverse color.  A 0 will cause all CRT colors > 0 to print
  1822.                       out as a black dot on the printer.  A 1 will create a
  1823.                       reverse video white on black image where all CRT colors >
  1824.                       0 will print out as white on the printer and a CRT color 0
  1825.                       will print as black.
  1826.  
  1827.           RETURNS: 0 if everything went OK, 1 if an error occurred.
  1828.  
  1829.           Special Considerations:  Because the two color scheme, graphs and
  1830.                  charts will look good printed, however, a PCX image will prob-
  1831.                  ably be all black or all white, unless only 2 colors are used 0
  1832.                  and another.
  1833.  
  1834.           Returns:
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.                                          -27-
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1856.  
  1857.  
  1858.  
  1859.           FUNCTION:  g_setclipr(x1,y1,x2,y2)
  1860.  
  1861.           Purpose: Define a rectangular region of the screen as the clipping
  1862.                region for graphics (i.e., any graphics falling outside this
  1863.                region will be cut off).
  1864.  
  1865.           Arguments: (x1,y1) is the upper left corner of clipping region in
  1866.                absolute or physical coordinates, and
  1867.                (x2,y2) is the lower right corner of the clipping region also in
  1868.                absolute coordinates.
  1869.  
  1870.           Returns nothing.
  1871.  
  1872.           FUNCTION:  g_selpalt(num)
  1873.  
  1874.           Purpose:  Use this function to activate one of up to four predefined
  1875.                    palettes when using the CGA or the EGA in video mode 4
  1876.                    (320x200 4 color) or video mode 5 (320x200 4 grey).
  1877.  
  1878.           Arguments:  num  is palette number being selected.
  1879.  
  1880.           Returns:    the previous palette number.
  1881.  
  1882.           FUNCTION:  g_setapage(num)
  1883.  
  1884.           Purpose:  Use this function in EGA or VGA graphics modes and in the
  1885.                    text modes to select the current page or portion of display
  1886.                    memory where graphics and text operations are performed.
  1887.                    This function only works when the adapter has enough video
  1888.                    memory to support multiple pages.
  1889.  
  1890.           Arguments:  num  is page number to be used for all further text and
  1891.                      graphics operations.
  1892.  
  1893.           Returns:    the previous active page number or a negative value if it
  1894.                      fails.
  1895.  
  1896.           FUNCTION:  g_setbkc(num)
  1897.  
  1898.           Purpose: Selects a new background color.  In graphics mode the change
  1899.               is visible immediately.  In text mode it is necessary to clear the
  1900.               screen to see the new background color.  In text modes, the back-
  1901.               ground color specified by a number from the current palette.  In
  1902.               EGA, for example, color number 4 in the default palette is red.
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.                                          -28-
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1922.  
  1923.  
  1924.  
  1925.           Argument: In text mode, the new color palette number.
  1926.               In graphics mode, the new color value (see notes on color).
  1927.  
  1928.           Returns nothing.
  1929.  
  1930.           FUNCTION:  g_setclr(num)
  1931.  
  1932.           Purpose: Selects a new color palette number to be used by all future
  1933.                   calls to drawing functions.  Until a color has been set, the
  1934.                   drawing routines use the highest color number in the palette.
  1935.  
  1936.           Argument: New color value
  1937.  
  1938.           Returns nothing.
  1939.  
  1940.           FUNCTION:  g_setfmsk(byte,byte,byte,byte,byte,byte,byte,byte)
  1941.  
  1942.           Purpose:  Defines a new pattern that will be used as a fill in func-
  1943.                    tions like g_rect(), g_pie(), and g_ellip().
  1944.  
  1945.           Arguments:  Eight integer from values 0 to 255 (see section Notes in
  1946.                    Fill Pattern).
  1947.  
  1948.           FUNCTION:  g_setline(num)
  1949.  
  1950.           Purpose: Selects a line pattern
  1951.  
  1952.           Argument: Number 0 to 15 where 0 is minimum number of dots to 15 a
  1953.                    solid line.  Numbers larger than 15 will generate a random
  1954.                    pattern.
  1955.  
  1956.           FUNCTION:  g_setorg(x,y)
  1957.  
  1958.           Purpose:  Use to change the origin of the x,y coordinates.  The
  1959.                    default origin is the upper left corner of the screen.
  1960.                    Usage of this function creates two sets of coordinates, the
  1961.                    absolute or physical one which is the original default and
  1962.                    remains unchanged, and the logical or relative one.
  1963.  
  1964.           Arguments: x,y coordinate for new origin.
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.                                          -29-
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  1988.  
  1989.  
  1990.  
  1991.           FUNCTION:  g_settxtc(num)
  1992.  
  1993.           Purpose: Selects a new color to be used by all future text output
  1994.                   using the g_say() function.  The first 16 colors are use (0
  1995.                   to 15) and (16 to 31) produce the first fifteen colors but
  1996.                   blinking.
  1997.  
  1998.           Argument: New color value 0 to 31.
  1999.  
  2000.           FUNCTION:  g_setvpage(num)
  2001.  
  2002.           Purpose:  Use this function in EGA or VGA graphics modes and in the
  2003.                    text modes to select the current page or portion of display
  2004.                    memory that is mapped to the screen.  This function only
  2005.                    works when the adapter has enough video memory to support
  2006.                    multiple pages.
  2007.  
  2008.           Arguments:  num  is page number to be displayed.
  2009.  
  2010.           Returns:    the previous visual page number or a negative value if
  2011.                      it fails.
  2012.  
  2013.           FUNCTION:  g_twindow(r1,c1,r2,c2)
  2014.  
  2015.           Purpose:  Defines a window in terms of row and column coordinate for
  2016.                    scrolled text output.  You can define a new background color
  2017.                    for text and clear the text window to give it a different
  2018.                    background color from the rest.  Similar windows for graphics
  2019.                    functions can be defined with g_viewport().
  2020.  
  2021.           Arguments: r1,c1 Upper left corner of text window in row and column
  2022.                     coordinate.
  2023.                     r2,c2 Lower right corner of text window in row and column
  2024.                     coordinate.
  2025.  
  2026.           Returns:  logical TRUE or FALSE
  2027.  
  2028.           FUNCTION:  g_viewport(x1,y1,x2,y2)
  2029.  
  2030.           Purpose:  Defines a window for graphics output,  the coordinate
  2031.                    origin is moved to the upper left corner of the viewport.
  2032.  
  2033.           Arguments: x1,y1 Upper left corner of graphics window
  2034.                     x2,y2 Lower right corner of graphics window
  2035.  
  2036.           Returns:  logical TRUE or FALSE
  2037.  
  2038.  
  2039.  
  2040.                                          -30-
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  2054.  
  2055.  
  2056.  
  2057.           FUNCTION:  g_video memory()
  2058.  
  2059.           Purpose:  To find out the amount of video memory.
  2060.  
  2061.           Returns:  Integer with the amount of video memory in Kbytes.
  2062.  
  2063.           FUNCTION:  g_wait()
  2064.  
  2065.           Purpose:  To wait until a character has been typed.  Similar to
  2066.                    Clipper's wait command, but Clipper's command disrupts the
  2067.                    graphics screen when in CGA mode.
  2068.  
  2069.           Returns:  Integer number corresponding to the character pressed.
  2070.  
  2071.           FUNCTION:  g_wraptxt(flag)
  2072.  
  2073.           Purpose:  Allows text to wrap on text window.
  2074.  
  2075.           Arguments:  flag is 0 -> do not wrap, 1 -> do wrap.
  2076.  
  2077.           FUNCTION:  g_xmax()
  2078.  
  2079.           Purpose:  To obtain the maximum number of horizontal pixels in the
  2080.                    current video mode.
  2081.  
  2082.           Returns:  Integer corresponding to the horizontal pixel number.
  2083.  
  2084.           FUNCTION:  g_xpos()
  2085.  
  2086.           Returns:  Integer corresponding to the drawing logical or relative x
  2087.                    position.
  2088.  
  2089.           FUNCTION:  g_ymax()
  2090.  
  2091.           Purpose:  To obtain the maximum number of vertical pixels in the
  2092.                    current video mode.
  2093.  
  2094.           Returns:  Integer corresponding to the vertical pixel number.
  2095.  
  2096.           FUNCTION:  g_ypos()
  2097.  
  2098.           Returns:  Integer corresponding to the drawing logical or relative y
  2099.                    position.
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.                                          -31-
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  2120.  
  2121.  
  2122.  
  2123.                                      3 ORDER FORM
  2124.  
  2125.      TO:  Maurice J. Halmos
  2126.           Video-Comp Electronics
  2127.           15000 Archwood St.
  2128.           Van Nuys, CA 91405-4550
  2129.           U.S.A.
  2130.           (818)988-9848
  2131.           CompuServe #: 73307,3076
  2132.  
  2133.  
  2134.      From:  Full Name:               ____________________________________
  2135.  
  2136.             Company Name (if any):   ____________________________________
  2137.  
  2138.             Street Address:          ____________________________________
  2139.  
  2140.             City, Sate, Zip:         ____________________________________
  2141.  
  2142.             Country:                 ____________________________________
  2143.  
  2144.             Phone(s):                ____________________________________
  2145.             CompuServe #:            ____________________________________
  2146.  
  2147.  
  2148.      Desired Registration & Disks:
  2149.  
  2150.      CLIPGRAF ver 2.1 Registration only:      $38 x Qty____ =  $_____
  2151.  
  2152.      CLIPMATH ver 1.0 Registration only:      $15 x Qty____ =  $_____
  2153.      ($10 only if with CLIPGRAF)
  2154.  
  2155.      CLIPGRAF & CLIPMATH Disk (1 for both)    $10              $_____
  2156.      (Postage & Handling)
  2157.                                               ---------------------------
  2158.  
  2159.      TOTAL Enclosed:                                           $_____
  2160.  
  2161.  
  2162.      When you register, I will send you your registration number to use in your
  2163.      program to inhibit the copyright notice.  This will be a simple one sheet
  2164.      letter.  If you require the disks sent to you, there is an additional $10
  2165.      charge for postage, handling and material.
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.                                          -32-
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  2186.  
  2187.  
  2188.  
  2189.                                   Table of Contents
  2190.  
  2191.      1 INTRODUCTION .................................................... 1
  2192.         1.1 Purpose & Registration ..................................... 1
  2193.         1.2 Disclaimer ................................................. 2
  2194.  
  2195.      2 THE GRAPHICS LIBRARY ............................................ 3
  2196.         2.1 Usage ...................................................... 3
  2197.         2.2 Running the Clipdemo ....................................... 4
  2198.         2.3 What is in the New Version ................................. 4
  2199.         2.4 Summary of functions ....................................... 5
  2200.         2.5 Functions Description  ..................................... 10
  2201.            2.5.1 Notes on Ellipse, Arc, and Pie ........................ 10
  2202.            2.5.2 Notes on Initializing and Modes ....................... 10
  2203.            2.5.3 Notes on Color ........................................ 11
  2204.            2.5.4 Notes in Fill Pattern ................................. 12
  2205.            2.5.5 Notes on Raster Image Save and Load ................... 12
  2206.            2.5.6 Notes on PCX Images Save and Load ..................... 13
  2207.            2.5.7 Notes on Using the Mouse. ............................. 15
  2208.            2.5.8 Functions ............................................. 16
  2209.              FUNCTION:  g_adapt() ...................................... 16
  2210.              FUNCTION:  g_arc(x1,y1,x2,y2,xb,yb,xe,ye) ................. 16
  2211.              FUNCTION:  g_clear(num) ................................... 16
  2212.              FUNCTION:  g_close() ...................................... 17
  2213.              FUNCTION:  g_cmax() ....................................... 17
  2214.              FUNCTION:  g_col() ........................................ 17
  2215.              FUNCTION:  g_disppcx(x,y,fname [,action,fm,fp]) ........... 17
  2216.              FUNCTION:  g_dot(x,y) ..................................... 18
  2217.              FUNCTION:  g_draw(x1,y1,IMAGE,action) ..................... 18
  2218.              FUNCTION:  g_ellip(fill,x1,y1,x2,y2) ...................... 18
  2219.              FUNCTION:  g_fill(x,y,bcolor) ............................. 19
  2220.              FUNCTION:  g_getbkc(num) .................................. 19
  2221.              FUNCTION:  g_getcolor() ................................... 19
  2222.              FUNCTION:  g_getdot(x,y) .................................. 19
  2223.              FUNCTION:  g_getlstyle() .................................. 19
  2224.              FUNCTION:  g_getlogx(x) ................................... 19
  2225.              FUNCTION:  g_getlogy(y) ................................... 19
  2226.              FUNCTION:  g_getphx(x) .................................... 19
  2227.              FUNCTION:  g_getphy(y) .................................... 20
  2228.              FUNCTION:  g_gettxtclr() .................................. 20
  2229.              FUNCTION:  g_imget(x1,y1,x2,y2) ........................... 20
  2230.              FUNCTION:  g_imload(x1,y1,"fname") ........................ 20
  2231.              FUNCTION:  g_imsave(x1,y1,x2,y2,"fname") .................. 20
  2232.              FUNCTION:  g_imsize(x1,y1,x2,y2) .......................... 21
  2233.              FUNCTION:  g_init(num) .................................... 21
  2234.              FUNCTION:  g_lineto(x,y) .................................. 21
  2235.  
  2236.  
  2237.  
  2238.                                          -ii-
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.      VideoSoft/Video-Comp                                       CLIPGRAF Library
  2252.  
  2253.  
  2254.  
  2255.              FUNCTION:  g_mode() ....................................... 21
  2256.              FUNCTION:  g_monitor() .................................... 22
  2257.              FUNCTION:  g_mouse(num) ................................... 22
  2258.              FUNCTION:  g_moveto(x,y) .................................. 22
  2259.              FUNCTION:  g_msread(num) .................................. 22
  2260.              FUNCTION:  g_ncolors() .................................... 22
  2261.              FUNCTION:  g_pcxinfo(fname) ............................... 22
  2262.              FUNCTION:  g_pcx_xs() ..................................... 23
  2263.              FUNCTION:  g_pcx_ys() ..................................... 23
  2264.              FUNCTION:  g_pcx_ver() .................................... 23
  2265.              FUNCTION:  g_pcx_pl() ..................................... 23
  2266.              FUNCTION:  g_pcx_bpp() .................................... 23
  2267.              FUNCTION:  g_pie(fill,x1,y1,x2,y2,xb,yb,xe,ye) ............ 23
  2268.              FUNCTION:  g_rect(fill,x1,y1,x2,y2) ....................... 24
  2269.              FUNCTION:  g_reg(num) ..................................... 24
  2270.              FUNCTION:  g_remapal(num,color) ........................... 24
  2271.              FUNCTION:  g_rmax() ....................................... 25
  2272.              FUNCTION:  g_row() ........................................ 25
  2273.              FUNCTION:  g_savpcx(x1,y1,x2,y2,"fname") .................. 25
  2274.              FUNCTION:  g_say(row,col,text) ............................ 25
  2275.              FUNCTION:  g_sdump(printer, port, res,xm,ym,rv) ........... 26
  2276.              FUNCTION:  g_setclipr(x1,y1,x2,y2) ........................ 28
  2277.              FUNCTION:  g_selpalt(num) ................................. 28
  2278.              FUNCTION:  g_setapage(num) ................................ 28
  2279.              FUNCTION:  g_setbkc(num) .................................. 28
  2280.              FUNCTION:  g_setclr(num) .................................. 29
  2281.              FUNCTION:  g_setfmsk(byte,byte,byte,byte,byte,byte,by-
  2282.              te,byte) .................................................. 29
  2283.              FUNCTION:  g_setline(num) ................................. 29
  2284.              FUNCTION:  g_setorg(x,y) .................................. 29
  2285.              FUNCTION:  g_settxtc(num) ................................. 30
  2286.              FUNCTION:  g_setvpage(num) ................................ 30
  2287.              FUNCTION:  g_twindow(r1,c1,r2,c2) ......................... 30
  2288.              FUNCTION:  g_viewport(x1,y1,x2,y2) ........................ 30
  2289.              FUNCTION:  g_video memory()  .............................. 31
  2290.              FUNCTION:  g_wait() ....................................... 31
  2291.              FUNCTION:  g_wraptxt(flag) ................................ 31
  2292.              FUNCTION:  g_xmax() ....................................... 31
  2293.              FUNCTION:  g_xpos() ....................................... 31
  2294.              FUNCTION:  g_ymax() ....................................... 31
  2295.              FUNCTION:  g_ypos() ....................................... 31
  2296.  
  2297.      3 ORDER FORM ...................................................... 32
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.                                         -iii-
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.